package com.nuoniu.sibanyun.entity.production;

import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 物料需求计划主表
 * </p>
 *
 * @author 小啊刚
 * @since 2023-05-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_mrp")
@ApiModel(value="MaMrp对象", description="物料需求计划主表")
public class MaMrp extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "计划名称")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "计划开始时间")
    @TableField("plan_start_date")
    private LocalDate planStartDate;

    @ApiModelProperty(value = "计划结束时间")
    @TableField("plan_end_date")
    private LocalDate planEndDate;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "审核人")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核人日期")
    @TableField("reviewer_date")
    private LocalDateTime reviewerDate;

    @ApiModelProperty(value = "计划人")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "计划人名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "计划时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "提交人id")
    @TableField("submit_user_id")
    private Integer submitUserId;

    @ApiModelProperty(value = "提交人姓名")
    @TableField("submit_user_name")
    private String submitUserName;

    @ApiModelProperty(value = "提交日期")
    @TableField("submit_date")
    private LocalDateTime submitDate;

    @ApiModelProperty(value = "创建类型（0.系统，1.手动）")
    @TableField("created_type")
    private Long createdType;

    @ApiModelProperty(value = "单据状态（应为审核状态）")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "关闭人ID")
    @TableField("closer_id")
    private Integer closerId;

    @ApiModelProperty(value = "关闭人")
    @TableField("closer_name")
    private String closerName;

    @ApiModelProperty(value = "关闭时间")
    @TableField("closed_date")
    private LocalDateTime closedDate;

    @ApiModelProperty(value = "关闭状态（0.未关闭，1.已关闭）")
    @TableField("closed_state")
    private Integer closedState;

    @ApiModelProperty(value = "明细列表")
    @TableField(exist = false)
    private List<MaMrpDetail> orderDetailList;
}
